<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>管理员设置</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

		<meta http-equiv="Content-Type" content="text/html">
		<style type="text/css">
<!--
body,td,th {
	font-size: 13px;
}
-->
</style>
		<script language="javascript"> 
function check(){ 
str = form1.time.value; 
strFirm = form1.donator.value;
strHandicapped = form1.handicapped.value;
str = str.match(/^(\d{2,4})(-|\/)(\d{1,2})\2(\d{1,2})$/); 
if (str == null){ 
alert('你输入的日期格式无效'); 
return false; 
}else if(str[3]>12 || str[4]>31){ 
alert("你输入的日期格式无效"); 
return false 
}else if (strFirm==""){ 
	alert('捐赠企业名称不能为空');
	return false;
} 
else if(strHandicapped==""){
	alert('残疾人姓名不能为空');
	return false;
}
else 
    return true;
} 
</script>
	</head>

	<body>
		<%
			String adminName = (String) session.getAttribute("adminName");
			String adminPassword = (String) session
					.getAttribute("adminPassword");
		%>
		<table width="99%" border="5" align="center" cellpadding="5"
			cellspacing="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
			<tr>
				<td height="16" background="admin/images/topbg.gif"
					bgcolor="#F7F7F7">
					<span class="STYLE1"> <img src="admin/images/pic5.gif"
							width="28" height="22" />您现在所在的位置是： <a href="adminIndex.jsp">管理首页</a>
						-&gt; <font color="red"><strong>添加捐赠信息</strong> </font> </span>
				</td>
			</tr>
			<tr>
				<td bgcolor="#FFFFFF">
					<br>
					<form name="form1" action="sponsorServlet?action=add" method="post" onSubmit="return check()">
						<table width="46%" height="109" border="2" align="center"
							cellpadding="1" cellspacing="1" bordercolor="#FFFFFF"
							bgcolor="#CCCCCC">
							<tr align="center" bgcolor="#F7F7F7" height="20">
								<td width="40%" height="25" background="images/topbg.gif">
									<strong>*捐赠者名称</strong>：
								</td>
								<td width="60%" height="25" background="images/topbg.gif">
									<label>
										<input name="donatorFirmName" type="text" id="donatorFirmName"
											size="18" maxlength="15">
									</label>
								</td>
							</tr>
							<tr align="center" bgcolor="#F7F7F7" height="20">
								<td width="40%" height="25" background="images/topbg.gif">
									<strong>*残疾人姓名：</strong>
								</td>
								<td width="60%" height="25" background="images/topbg.gif">
									<label>
										<input name="handicappedName" type="text" id="handicappedName"
											size="18" maxlength="15">
									</label>
								</td>
							</tr>
							<tr align="center" bgcolor="#F7F7F7" height="20">
								<td height="25" background="images/topbg.gif">
									<strong>*捐赠时间：</strong>
								</td>
								<td height="25" background="images/topbg.gif">
									<label>
										<input name="time" type="text" id="donatorTime" size="18"
											maxlength="15">
									</label>
								</td>
							</tr>
								<tr align="center" bgcolor="#F7F7F7" height="20">
								<td height="25" background="images/topbg.gif">
									<strong>*企业或个人：</strong>
								</td>
								<td height="25" background="images/topbg.gif">
									<label>
										<input name="sponsor" type="radio" value = "qiye" checked>企业
                                        <input type="radio" name="sponsor" value = "geren">个人
										
									</label>
								</td>
							</tr>
							<tr align="center" bgcolor="#F7F7F7" height="20">
								<td height="25" background="images/topbg.gif">
									&nbsp;
									<br>
								</td>
								<td height="25" background="images/topbg.gif">
									<input type="submit" name="submit" id="submit" value="添加">
									<input type="reset" name="button" id="button" value="重置">
								</td>
							</tr>
						</table>
					</form>
					<br>
				</td>
			</tr>
		</table>
		<br>
		<br>
	</body>
</html>
